package com.atguigu.ssyx.search.repository;

import com.atguigu.ssyx.model.search.SkuEs;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * 用于操作Elasticsearch
 */
public interface SkuRepository extends ElasticsearchRepository<SkuEs,Long> {

    /**
     * 根据热门评分hotScore，获取爆款商品
     */
    Page<SkuEs> findByOrderByHotScoreDesc (Pageable pageable);
}
